/* Filename: mytbf.h
 * Description: 查询法实现令牌桶的库
 * Last modified: humble 2020-09-02 18:04:11
 */
#ifndef __MYTBF_H__
#define __MYTBF_H__

typedef void mytbf_t;

extern mytbf_t *mytbf_init(int cps, int burst);

extern int mytbf_fetch(mytbf_t *ptr, int size);
extern int mytbf_return(mytbf_t *ptr, int size);

extern int mytbf_destroy(mytbf_t *ptr);
#endif //__MYTBF_H__
